export const industryCustomerInterception: Array<ReqInit> = [
    { // 客群趋势
        url: 'sycm.taobao.com/mc/mq/industryCustomer/customerTrend.json',
    },
    // Start: 客群趋势-客群画像
    { // 属性画像-性别
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'gender',
            indexCode: 'payByrCntRate',
        }
    },
    { // 属性画像-年龄
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'age',
            indexCode: 'payByrCntRate',
        }
    },
    { // 属性画像-职业
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'career',
            indexCode: 'payByrCntRate',
        }
    },
    { // 属性画像-省份
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'prov',
            indexCode: 'payByrCntRate',
        }
    },
    { // 属性画像-城市
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'city',
            indexCode: 'payByrCntRate',
        }
    },

    { // 属性画像-性别
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'gender',
            indexCode: 'payRateIndex',
        }
    },
    { // 属性画像-年龄
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'age',
            indexCode: 'payRateIndex',
        }
    },
    { // 属性画像-职业
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'career',
            indexCode: 'payRateIndex',
        }
    },
    { // 属性画像-省份
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'prov',
            indexCode: 'payRateIndex',
        }
    },
    { // 属性画像-城市
        url: 'sycm.taobao.com/mc/mq/industryCustomer/getIndexValue.json',
        params: {
            attrType: 'city',
            indexCode: 'payRateIndex',
        }
    },

    // End: 客群趋势-客群画像
];

export enum industryCustomerPortraitType {
    gender, age, career, prov, city
}

export enum industryCustomerPortraitIndexCode {
    payByrCntRate, payRateIndex,
}

export const industryCustomerPortrait = (type: industryCustomerPortraitType, indexCode: industryCustomerPortraitIndexCode = industryCustomerPortraitIndexCode.payByrCntRate) => {
    return industryCustomerInterception[type + (1 + (indexCode * 5))];
}
